//
//  TTMemoryCache.h
//  Tint
//
//  Created by Kevin Wu on 2/23/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTCache.h"


@interface TTMemoryCache : TTCache {
    NSMutableArray *_cacheArray;
}

- (NSString *)stringForKey:(NSString *)key;
- (void)setString:(NSString *)string forKey:(NSString *)key;
- (void)setString:(NSString *)string forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (UIImage *)imageForKey:(NSString *)key;
- (void)setImage:(UIImage *)image forKey:(NSString *)key;
- (void)setImage:(UIImage *)image forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

- (id)objectForKey:(NSString *)key;
- (void)setObject:(id)object forKey:(NSString *)key;
- (void)setObject:(id)object forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;

+ (NSArray *)allCacheTypes;

@end



@interface TTMemoryCacheItem : NSObject {
    NSString *_key;
    NSDate *_expirationDate;
    id _object;
}
@property(nonatomic, copy) NSString *key;
@property(nonatomic, retain) NSDate *expirationDate;
@property(nonatomic, retain) id object;
@end
